package com.laijiale.dto;

import com.laijiale.constant.RE;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author laijiale
 * @date 2025年01月09日 0:49
 */
 @Schema(name ="用户修改密码DTO")
 @Data
 public class UserUpdatePasswordDTO implements Serializable, RE {
 @NotNull(message = "主键不能为空")
 @Schema(description = "主键")
 private Long id;
 @Schema(description = "登录密码")
 @NotEmpty(message = "旧密码不能为空")
 @Pattern(regexp = PASSWORD_RE, message = PASSWORD_RE_MSG)
 private String oldPassword;
 @Schema(description = "登录密码")
 @NotEmpty(message = "新密码不能为空")
 @Pattern(regexp = PASSWORD_RE, message = PASSWORD_RE_MSG)
 private String newPassword;
}
